<?php

require("/srv/http/scrap/conf.php");
require($srvpath."dbconf.php");

//echo $ico;

require_once($srvpath."data/dbase.php");
//echo "jjj";
require_once($srvpath."data/basic.php");
//echo $srvpath;
//require("../view/front.php");

global $conn_handler;
//echo 'nyan';
if (!$conn_handler) {
	//echo 'un<br />';
	$conn_handler=ConnectDB();
}

if (!$conn_handler) {
	echo 'fail';
}
else {
	SelectDB();
	//echo "nyaa ^o^";
	global $sitetitle;
	$sitetitle=RetrSiteTitle();
	//echo $sitetitle;
	//global $fparams;
	//$fparams=RetrPageParams('frontp');
	//echo 'nn';
	//echo $rfparams[0];
}

function render($params) {
	//echo 'main.php->render';

	$mode=$params['p'];
	#echo $mode;
	if ($mode=='front') display_front(RetrPageParams('frontp'));
	if ($mode=='cpanel') init_panel();

}



?>
